package com.lp.yupao.model.enums;

public enum TeamStatusEnums {
    //0 - 公开，1 - 私有，2 - 加密
    PUBLIC(0,"公开"),
    PRIVATE(1,"私有"),
    ENCRYPTION(2,"加密");
    private Integer key;
    private String values;
    // 通过key查询values
    public String searchValues(Integer key){
        TeamStatusEnums[] teamStatusEnums = TeamStatusEnums.values();
        for (TeamStatusEnums teamStatusEnum : teamStatusEnums) {
            if (key.equals(teamStatusEnum.getKey())){
                return teamStatusEnum.getValues();
            }
        }
        return null;
    }

    TeamStatusEnums(Integer key, String values) {
        this.key = key;
        this.values = values;
    }

    public Integer getKey() {
        return key;
    }

    public void setKey(Integer key) {
        this.key = key;
    }

    public String getValues() {
        return values;
    }

    public void setValues(String values) {
        this.values = values;
    }
}
